1. Technical Field:
The present invention relates in general to improvements in data processing systems and in particular to methods and systems for optimizing system resource allocation within a data processing system. Still more particularly, the present invention relates to a method and system for allocating system memory during adapter configuration in order to maximize the number of sixteen kilobyte free memory pages remaining within system memory for utilization by an expanded memory system.
2. Description of the Related Art:
Modem state-of-the-art personal computers, such as the International Business Machines Corporation Personal System/2 are capable of interfacing with a large number of other devices utilizing so-called "adapters" which electrically interconnect with a personal computer utilizing expansion slots or bus connections. Examples of known adapters include: disk drive controllers, such as Small Computer System Interface (SCSI) controllers and Enhanced Small Device Interface (ESDI) controllers; Terminal Emulator Adapters, such as 3270A and 3270B; Motorway Cards; and, Token Ring Cards.
Each of the above-referenced adapters includes various specifications which are generally set forth in an Adapter Description File (ADF). The Adapter Description File includes a plurality of configuration choices which specify the preferred memory address ranges in ROM or RAM, which are required to configure a data processing system for a selected adapter. Certain adapters may include over thirty choices and therefore, those skilled in the art will appreciate that the configuration of a large number of adapters will result in a very large number of possible combinations which must be evaluated in order to optimize allocation of system resources. This is particularly true in data processing systems which utilize expanded memory as specified by the Lotus/Intel Expanded Memory Specification (EMS), which requires the configuration to maximize the number of available sixteen kilobyte free memory pages which will be available for utilization by the expanded memory system.
Existing systems permit the automatic configuration of adapters; however, such systems are highly sequence dependent and, due to the large number of possible combinations, are very time consuming. For example, studies have shown that for selected sequences of adapter cards automatic configuration may take almost one hour. Most of that time is occupied by the requirement that the configuration satisfy the requirements of the enhanced Lotus/Intel Expanded Memory Specification (EMS). The EMS requirement involves the finding of a conflict free configuration which results in a maximum number of sixteen kilobyte free memory pages in the 0C0000(Hex) and 0D0000(Hex) memory segments.
The process followed for this requirement first finds a conflict free configuration from the choices set forth within the aforementioned Adapter Description File and thereafter determines the amount of free memory in the 0C0000(Hex) and 0D0000(Hex) segments. Utilizing this amount of free memory as a starting point, for each possible position of free memory aligned on a sixteen kilobyte boundary, a conflict free configuration is searched for. If a conflict free configuration is not found, free memory is decremented by four kilobytes and the process repeats until an amount of free memory is found which is greater than or equal to sixteen kilobytes. The order of memory item configuration is continually permuted and the possible choices are all evaluated until a conflict free configuration is found. The worst case number of combinations which must be evaluated utilizing this approach may be expressed as follows: ##EQU1## where N=freemen-16/4, is the number of memory items and n.sub.1, . . . n.sub.m are the number of choices for each memory item. As those skilled in the an will appreciate, this technique possesses very poor scaling properties by virtue of its dependence upon the factorial of the number of memory items defined and the procedure is sequence dependent since the starting order of the memory items is dependent upon the sequence of the configuration of the adapters.
Thus, it should be apparent to those skilled in the art that a need exists for a more efficient method and system for optimizing memory allocation during adapter configuration in a data processing system.